package org.pombo.gtb;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import java.util.List;

import org.pombo.gtm.Action;
import org.pombo.gtm.InformationSet;
import org.pombo.gtm.Node;
import org.pombo.gtm.Player;
import org.pombo.gtm.StrategyNode;

public class StrategyNodeBuilder extends Builder<StrategyNode> {

	@Override
	public void clear() {
		this.entity = mock(StrategyNode.class);
	}

	public StrategyNodeBuilder withActions(List<Action> actions) {
		when(this.entity.getActions()).thenReturn(actions);
		return this;
	}

	public StrategyNodeBuilder withNodeForAction(Node node, Action action) {
		when(this.entity.getNodeForAction(action)).thenReturn(node);
		return this;
	}

	public StrategyNodeBuilder forPlayer(Player player) {
		when(this.entity.getPlayer()).thenReturn(player);
		return this;
	}

	public StrategyNodeBuilder withInformationSet(InformationSet infoSet) {
		when(this.entity.getInformationSet()).thenReturn(infoSet);
		return this;
	}

}
